package com.testdocs.client.project.event;

import com.google.gwt.event.shared.GwtEvent;
import com.testdocs.client.project.ProjectInfo;

public class ProjectSelectedEvent extends GwtEvent<ProjectSelectedEventHandler> {
	public static Type<ProjectSelectedEventHandler> TYPE = new Type<ProjectSelectedEventHandler>();
	
	private ProjectInfo projectInfo;

	public ProjectSelectedEvent(ProjectInfo projectInfo) {
		this.projectInfo = projectInfo;
	}
	
	@Override
	protected void dispatch(ProjectSelectedEventHandler handler) {
		handler.projectSelected(this);
	}

	@Override
	public Type<ProjectSelectedEventHandler> getAssociatedType() {
		return TYPE;
	}

	public ProjectInfo getProjectInfo() {
		return projectInfo;
	}

}
